package cn.kk.jump;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
public class Images {
    public static BufferedImage sky;
    public static BufferedImage gamer;
    public static BufferedImage box;
    public static BufferedImage start;
    public static BufferedImage pause;
    public static BufferedImage gameover;

    /**给图片做初始化*/
    static {
        sky=readImage("Sky.png");
        gamer=readImage("Gamer.png");
        box=readImage("box.png");

    }

    /**读取图片*/
    private static BufferedImage readImage(String fileName) {
        try {
            BufferedImage img = ImageIO.read(State.class.getResource(fileName));
            return img;
        }catch (Exception e){
            e.printStackTrace();
            throw new RuntimeException();
        }
    }



}
